package org.ykh.service.web.io;

import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import java.util.concurrent.atomic.AtomicBoolean;

/**
 * @author ykh
 */
public abstract class EasyServletInputStream extends ServletInputStream {

    protected AtomicBoolean finished = new AtomicBoolean(false);

    @Override
    public boolean isFinished() {
        return finished.get();
    }

    @Override
    public boolean isReady() {
        return true;
    }

    @Override
    public void setReadListener(ReadListener listener) {
        throw new UnsupportedOperationException();
    }
}
